<?php
// No directAcces
defined( '_AppBackMiage' ) or die( 'Restricted access' );
if(isAdministrateur ()){
    include_once (DS."backoffice/include/header.php");

    if(isset($_GET['uid']) && !empty($_GET['uid']))
    {
        $entreprise = new Entreprise($_GET['uid']);
    }
    else
    {
        redirectTo(URLBACK."_userentreprise_list");
    }
    ?>
    <?php

    include_once( DS."backoffice/include/toppanel_utilisateurs.php");

    ?>
    <div id="wrapper">
        <div id="content">
            <div id="box">
                <h3 id="adduser">Entreprise  <?php echo stripslashes($entreprise->getNomEntreprise()); ?></h3>
                <form id="form" method="post">
                <fieldset id="personal">
                    <legend>Description</legend>
                    <?php echo stripslashes($entreprise->getDescriptionEntreprise()); ?>
                    <br />
                </fieldset>
                <fieldset id="personal">
                    <legend>Contact</legend>
                    <label>Telephone :</label>
                    <label class="input"><?php echo $entreprise->getTelephoneEntreprise(); ?></label>
                    <br />
                    <label>Email :</label>
                    <label class="input"><?php echo $entreprise->getMailEntreprise(); ?></label>
                    <br />
                    <label>Site :</label>
                    <label class="input"><a href="<?php echo $entreprise->getSiteEntreprise(); ?>" target="_blank"><?php echo $entreprise->getSiteEntreprise(); ?></a></label>
                </fieldset>
                <fieldset id="address">
                    <legend>Adresse</legend>
                    <label>Adresse :</label>
                    <label class="input"><?php echo $entreprise->getAdresse1Entreprise(); ?></label>
                    <br />
                    <label>Adresse + :</label>
                    <label class="input"><?php echo $entreprise->getAdresse2Entreprise(); ?></label>
                    <br />
                    <label>Ville :</label>
                    <label class="input"><?php echo $entreprise->getVilleEntreprise(); ?></label>
                    <br />
                    <label>Code Postal :</label>
                    <label class="input"><?php echo $entreprise->getCPEntreprise(); ?></label>
                    <br />
                </fieldset>
                <br /><span class="error"><?php if(isset($errMSG['types'])){ echo $errMSG['types']; } ?></span>
                </form>
            </div>
            </div>
    <?php
    include_once (DS."backoffice/include/sidebar.php");
    include_once (DS."backoffice/include/footer.php");
}
else
{
    redirectTo(URLBACK);
}
?>